{% extends 'BXTRAdminBundle::Layout.html.twig' %}

{% block content %}
    <p>{% trans %}Admin.Welcome{% endtrans %}</p>
    <div class="row">
        {# Print the linklist without the index page #}
        {% for link in linklist if not link.path is defined or link.path != 'bxtr_admin_index' %}
            {% if link.sub is defined %}
                <div class="col-sm-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">{{ link.name }}</h2>
                        </div>
                        <div class="list-group">
                            {% for sublink in link.sub %}
                                <a class="list-group-item" href="{{ path(sublink.path) }}" >{{ sublink.name }}</a>
                            {% endfor %}
                        </div>
                    </div>
                </div>
            {% else %}
                <a href="{{ path(link.path) }}" >{{ link.name }}</a>
            {% endif %}
        {% endfor %}
    </div>
{% endblock %}
